-
Notifications
You must be signed in to change notification settings - Fork 2
chore: plugin manifest definition #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
d218b64 to
0c73331
Compare
chore: make plugin manifest required All plugins must now declare a static manifest property with their metadata and resource requirements. This simplifies the manifest loader and provides better error messages.
0c73331 to
eb19da1
Compare
Implement manifest loader with validation and error handling. All plugins must have a static manifest property. Features: - getPluginManifest() - loads and validates plugin manifests - getResourceRequirements() - extracts resource requirements - Comprehensive validation with clear error messages - Unit tests and integration tests with core plugins
780c458 to
14b339e
Compare
pkosiec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, just small comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something went wrong with displaying an icon near to the enum in the docs - it falls-back to the "other" category, but it should use enum:
appkit/docs/src/css/custom.css
Lines 112 to 116 in 8dceeb4
| .api-kind-enum .menu__link::before { | |
| border-color: var(--api-kind-enum-color); | |
| color: var(--api-kind-enum-color); | |
| content: "E"; | |
| } |
Lines 35 to 46 in b70ea1c
| for (const subItem of item.items) { | |
| // Extract kind from the id (e.g., "Function." from "api/appkit/Function.name") | |
| // To get "function", "class", "interface", etc. | |
| const idParts = subItem.id.split("/").pop() || ""; | |
| const rawKind = idParts.split(".")[0].toLowerCase(); | |
| const kind = SUPPORTED_KINDS.has(rawKind) ? rawKind : "other"; | |
| flatItems.push({ | |
| ...subItem, | |
| className: `api-kind-${kind}`, | |
| }); | |
| } |
Could you please check? maybe it's just named "enumeration" or sth, and the fix will be easy. Thanks!
| ]); | ||
|
|
||
| /** Base abstract class for creating AppKit plugins */ | ||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome you documented this 👌
| timeout: { | ||
| type: "number", | ||
| default: 30000, | ||
| description: "Query execution timeout in milliseconds", | ||
| }, | ||
| queriesDir: { | ||
| type: "string", | ||
| description: "Directory containing SQL query files", | ||
| }, | ||
| cacheEnabled: { | ||
| type: "boolean", | ||
| default: true, | ||
| description: "Enable query result caching", | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timeout is defined on the constructor level, but what about the other properties? 🤔
appkit/packages/appkit/src/plugins/analytics/types.ts
Lines 3 to 5 in 2e1be40
| export interface IAnalyticsConfig extends BasePluginConfig { | |
| timeout?: number; | |
| } |
| * Configuration schema definition for plugin config. | ||
| * Uses JSON Schema format for validation and documentation. | ||
| */ | ||
| export interface ConfigSchema { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should already use existing JSON schema types from some library? I believe at some point we'll use some lib to validate the configuration, right?
(totally fine to skip this comment)
This PR introduces the definition for manifests, resources and so on for plugins plus the manifests for both analytics and server plugin